% -*-LaTeX-*-
% Converted automatically from troff to LaTeX by tr2tex on Tue Dec 18 11:07:19 1990
% tr2tex was written by Kamal Al-Yahya at Stanford University
% (Kamal%Hanauma@SU-SCORE.ARPA)


\documentstyle[troffman]{article}
\begin{document}
%
% input file: clr2gray.1
%
\phead{CLR2GRAY}{1}{25-Jun-90}

%.CM 3
\shead{NAME}
clr2gray -- Convert color images to grayscale
\shead{SYNOPSIS}
\nofill
clr2gray [ -r$<$red$>$ -g$<$grn$>$ -b$<$blu$>$ ] [ -$<$type$>$ ] $<$ color $>$ gray
\fill
\shead{DESCRIPTION}
\par
Converts a color image (8bit or 24bit) to an 8 bit grayscale image.
It works for both mapped and unmapped color inputs.
\shead{OPTIONS}
\begin{TPlist}{{\bf -r$<$num$>$,}{\rm -g$<$num$>$,}{\bf -b$<$num$>$}
}
\item[{{\bf -r$<$num$>$,}{\rm -g$<$num$>$,}{\bf -b$<$num$>$}
}]
{\it weights,}
used to convert the triple $<$red,green,blue$>$ to a scalar intensity
value.  If one or more weights are specified, those not specified
default to zero.   If no weights are specified, NTSC weights (29.9\%
red, 58.7\% green, 11.4\% blue) are used.
\item[{{\bf -B}
}]
{\it face}
format, as used by Bennet Yee's
{\it face}
program at CMU. 
\item[{{\bf -F}
}]
{\it FBM,}
format (by default, the default).  You are guaranteed not
to lose information by specifying FBM as the default.
\item[{{\bf -G}
}]
{\it GIF,}
Compuserve GIF format.
\item[{{\bf -I}
}]
{\it IFF}
format, interleaved bitmaps (ILBM), used by Amigas.
\item[{{\bf -P}
}]
{\it PBM,}
Jef Poskanzer's bitmap format.
\item[{{\bf -S}
}]
{\it sun,}
Sun rasterfiles (not run length encoded).
\end{TPlist}
\shead{EXAMPLE}
\par
To convert a mapped color image in FBM format to a Sun
format grayscale image:
\par\vspace{1.0\baselineskip}
	\% clr2gray -S $<$ foo.fbm $>$ foo.8bit
\par\vspace{1.0\baselineskip}
To extract the red color plane from an image and write the result in
FBM format:
\par\vspace{1.0\baselineskip}
	\% clr2gray -r1 -F $<$ foo.fbm $>$ red.fbm
\par\vspace{1.0\baselineskip}
Note that since the green and blue weights were not specified, they
defaulted to 0, and the result is that only the red plane is used.
\shead{SEE ALSO}
fbm(1) for general discussion, pbm(1) for PBM routines.
\shead{BUGS}
None known.
\shead{HISTORY}
Copyright (C) 1989,1990 by Michael Mauldin.  Permission is granted
to use this file in whole or in part for any purpose, educational,
recreational or commercial, provided that this copyright notice
is retained unchanged.  This software is available to all free of
charge by anonymous FTP and in the UUNET archives.
\begin{TPlist}{25-Jun-90  Michael Mauldin at Carnegie Mellon University}
\item[{25-Jun-90  Michael Mauldin at Carnegie Mellon University}]
Release 1.0 mlm@cs.cmu.edu
\item[{07-Mar-89  Michael L. Mauldin at Carnegie Mellon University}]
Beta release (version 0.9) mlm@cs.cmu.edu
\end{TPlist}
\end{document}
